<?php

namespace App\Models\Reservation;

use App\Models\Hospital;
use Silber\Bouncer\Database\Ability as Bouncer;
use Silber\Bouncer\Database\Models;

class Ability extends Bouncer
{
    /**
     * @return \Illuminate\Database\Eloquent\Relations\MorphToMany
     */
    public function hospitals()
    {
        return $this->morphedByMany(Hospital::class, 'entity', Models::table('permissions'));
    }
}
